package com.boomsecret.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.boomsecret.service.TestService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wangjinliang on 2019/1/24.
 */
@RestController
public class TestController {

    @Reference(version = "1.0.0")
    private TestService remoteTestService;

    @RequestMapping(value="/test/{name}")
    public String sayHello(@PathVariable("name") String name){
        return remoteTestService.sayHello(name);
    }
}
